#lang racket
; Refence Link: https://www.scheme.com/tspl4/start.html#./start:h0
; Exercise 2.2.1
(+ -8.7 (* 1.2 (- 2 (/ 1 3))))

(/ (+ (/ 2 3)(/ 4 9))(- (/ 5 11)(/ 4 3)))

(+ 1 (/ 1 (+ 2(/ 1 (+ 1 (/ 1 2))))))

(* 1 (* -2 (* 3 (* -4 (* 5 (* -6 7))))))

; Define some procedure
(define adds
  (lambda (n)
    (* n n)))
;Exercise 2.2.3
(cons 'car 'cdr)

(list 'this '(is silly))

(cons 'is '(this silly?))

(quote (+ 2 3))

(cons '+ '(2 3))

(car '(+ 2 3))

(cdr '(+ 2 3))

cons

(quote cons)

(quote (quote cons))

(car (quote (quote cons)))

(+ 2 3)

(+ '2 '3)

(+ (car '(2 3)) (car (cdr '(2 3))))

((car (list + - * /)) 2 3)

; Exercise 2.2.4
; yields b

(car (car '((a b) (c d))))
(car (cdr (car '((a b)(c d)))))
(car (car (cdr '((a b)(c d)))))
(car (cdr (car (cdr '((a b)(c d))))))

;Exercise 2.2.5
(define data (cons (cons 'a 'b)
      (cons (cons (cons 'c '())(cons 'd '()))
            (cons '() '()))))




